<template>
<span>
    <span v-if="model.hasSalesPromotion">
        <span sz1 blue>￥{{formatPrice(model.price)}}</span>
        <s pdx1 sz0 gray3>￥{{formatPrice(model.originalPrice)}}</s>
    </span>
    <span v-else-if="model.isEnabledShoppingOption">
        <span sz1 blue>￥{{formatPrice(model.minPrice)}}~{{formatPrice(model.maxPrice)}}</span>
    </span>
    <span v-else-if="model.originalPrice==model.price||!model.isForMember">
        <span sz1 blue>￥{{formatPrice(model.originalPrice)}}</span>
    </span>
    <span v-else>
        <span sz1 blue>￥{{formatPrice(model.price)}}</span>
        <s pdx1 sz0 gray3>￥{{formatPrice(model.originalPrice)}}</s>
    </span>
</span>
</template>

<script lang="ts">
import { Component, Vue,Inject, Prop,Watch } from 'vue-property-decorator';
import AbpBase from '../../lib/abpbase'

@Component
export default class CommodityPrice extends AbpBase{
    @Prop() model:any;
}
</script>

<style>

</style>
